# Contributor: August Klein <amatcoder@gmail.com>
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: August Klein <amatcoder@gmail.com>
pkgname=meld
pkgver=3.22.0
pkgrel=5
pkgdesc="Visual diff and merge tool"
url="https://meldmerge.org"
arch="noarch"
license="GPL-2.0-or-later"
depends="
	dconf
	gsettings-desktop-schemas
	gtksourceview4
	py3-cairo
	py3-gobject3
	python3
	"
makedepends="
	glib-dev
	gtksourceview4-dev
	itstool
	libxml2-utils
	meson
	py3-cairo-dev
	py3-gobject3-dev
	python3-dev
	"
checkdepends="
	gtk-update-icon-cache
	py3-pytest
	"
subpackages="$pkgname-lang $pkgname-doc $pkgname-pyc"
source="https://download.gnome.org/sources/meld/${pkgver%.*}/meld-$pkgver.tar.xz
	fix-meson-pyc-compile.patch
	"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	pytest
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
4cc1c9a76379401c1f116292bb4730301ec0f2413cdab7b463ed519ea7ee0ee86143a9c83a13f1ef09860aad192c04769d111bfb1eb10b5e1bc81fb44c530526  meld-3.22.0.tar.xz
f547944e42ea8a2008f960d58c8a359f2d50ab5b408b8568c2d2aed0a9ea42390f3e5b425816735e024b888d1ae7f2c8fc16422f487f23b141e0720091280cec  fix-meson-pyc-compile.patch
"
